package com.mf.springboot.backend.commonService.service;

import com.mf.springboot.backend.commonModule.utils.EncryptUtils;
import com.mf.springboot.backend.mybatisModule.entity.TLoginUser;
import com.mf.springboot.backend.mybatisModule.entity.TLoginUserExample;
import com.mf.springboot.backend.mybatisModule.mapper.TLoginUserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lx on 2017/9/18.
 */
@Service
public class TLoginUserService {
    @Resource
    private TLoginUserMapper loginUserMapper;

    public int insertLoginUser(TLoginUser record){
        record.setPassword(EncryptUtils.encryptAes(record.getPassword()));
        return loginUserMapper.insert(record);
    }

    public List<TLoginUser> selectByExample(TLoginUserExample example){
        return loginUserMapper.selectByExample(example);
    }
}
